In an information processing apparatus such as a computer and the like, a kernel of an operating system (OS) is activated, the application program becomes available. The series of operation from the power activation to the activation of the kernel of the operating system is generally called a boot sequence. Here, a kernel refers to a program that is positioned at the core of the operating system and operates in the privileged mode. However, since the definition of the kernel differs depending on the type of the operating system, and it is assumed that the definition as to the extent to which the operating system is included in the kernel is based on the setting policy of each operating system.
FIGS. 1A and 1B are diagrams presenting a boot sequence.
FIG. 1A is a flowchart presenting the procedure of a boot sequence.
In a boot sequence, first, the POST (Power On Self Test) diagnosis is performed (step S1). The POST is performed by, for example, BIOS (Basic Input/Output System). The BIOS is, stored in, for example, a ROM (Read Only Memory), a PROM (Programmable ROM), or a flash memory and the like. In the POST, a check is performed as to whether the hardware devices constituting the computer as an information processing apparatus such as the CPU (Central Processing Unit) as the processor, the main memory (main storage apparatus), the disk controller, the serial/parallel port, the keyboard controller and the like are operating normally.
Next, the CPU activates the firmware stored in the ROM and the like (step S2). The firmware activated and executed performs the kernel initial setting (boot process), to execute the initialization of the main memory (step S3).
Details of the kernel initial setting (boot process) are presented in FIG. 1B.
In the boot process, first, the initialization of the main memory is performed by the firmware (step S31). In the memory initialization, as illustrated schematically in FIG. 1B, from the head of a main memory 20, the main memory is initialized sequentially. In the memory initialization, “mapping from the virtual address (logical address) to the physical address (real address)”, “generation of a page table” and the like are performed. Here, the virtual address refers to the address on a virtual space in a computer of the virtual memory system. Details of the memory initialization will be described later. In the kernel initial setting, next, the kernel is loaded on the main memory from an external storage apparatus by the boot program, and the kernel is activated. The kernel performs the initialization of the kernel itself, and loading of the main memory of the kernel module and the device driver, and finally, generates and activates the init process (step S32).
The init process executes the init processing (step S4). In the init processing, the init process performs the health check of the hard disk, the activation of a daemon (a process executed on the background), and performs the activation of the login manager finally.
FIG. 2 presents the conventional memory initialization process by hardware provided in a computer.
A computer 1 presented in FIG. 2 has three CPUs 10 (10-1, 10-2, 10-3), a memory 20, a ROM 30 in which firmware 31 is stored, and an external storage apparatus 40 in which an OS 41 is stored. Thus, the computer 1 is a computer in the multiprocessor configuration having three CPUs 10. As illustrated in FIG. 2, conventionally, even the computer 1 in the multiprocessor configuration performs the memory initialization process by executing the firmware by one CPU 10.
FIG. 3 presents details of the memory initialization process.
Hereinafter, referring to FIG. 3, the procedure of the memory initialization process is explained.
The CPU 10 presented in FIG. 3 has an operation unit 11 such as an ALU (Arithmetic Logical Unit), and an MMU (Memory Management Unit) 12. The MMU 12 has an address conversion function to convert a virtual address to a physical address, and a memory protection function. The MMU 12 has a TLB (Translation Look-aside Buffer) 121 being a circuit that executes the address conversion function. The MMU 12 in this example has two TLB 121s (121-1, 121-2).
Hereinafter, the procedure of the memory initialization is explained with reference to FIG. 3.
(1) The firmware (boot program) 31 generates a conversion table 50 storing the mapping information of the physical address and the virtual address of the main memory 20.
(2) The MMU 12 refers to the conversion table 50 to perform a process to convert the virtual address to the physical address.
(3) The MMU 12 stores the conversion result (correspondence between the virtual address and the physical address) in the TLB 121.
(4) The firmware 31 generates, on the main memory (physical memory) 20, the physical address of the main memory 20, and a page table 21 managing the size (page table size) of pages PA1, PA2, PA3 . . . generated on the main memory 20. Here, the pages PA1, PA2, PA3 . . . , are the access unit of data stored in the main memory 20 that is managed by the virtual memory system.
In the computer 1, when the operation unit 11 accesses the main memory 20 to obtain the target data, it refers to the TLB 121 and converts the virtual address of the target data to the physical address. Then, using the physical address obtained by the conversion, it accesses the main memory 20, to read out the target data from the main memory 20.
Conventionally, since the capacity of the main memory mounted on a computer was small, there was practically no problem with the initialization of the main memory only with the firmware described above. However, in recent years, with the advances of the integration technology of the semiconductor memory, the capacity of the main memory mounted on a computer has been increasing. Accordingly, the time required for memory initialization has increased as well, and the time of the activation of the OS, that is, the activation of the system of the computer has been delayed.
This seems to be because of the problems (1)-(3) below of the conventional memory initialization method by the firmware.
(1) The time required for memory initialization depends on the capacity of the main memory (main memory size).
(2) While there is no need that all the areas of the main memory are initialized at the initial stage of the activation of the kernel, all the areas of the main memory is initialized.
(3) Since execution of the firmware is performed by one CPU, the parallel processing of the memory initialization by the firmware cannot be performed, and the memory initialization process is performed by sequential execution.
For currently, the main measures against the problem of delayed system activation has been the adoption of a method to increase the initialization unit (page size) at the time of memory initialization.
For example, comparing the cases in which the initialization of the main memory is performed with a page size of 8 KB (kilobytes) and a page size of 4 MB (megabytes), there is a tremendous difference in the time of initialization as presented in Table 1 below.
TABLE 1for 1 GB memory8 KB unit131,072 times4 MB unit   256 times
As illustrated in Table 1, if the capacity of the main memory is 1 GB (gigabyte), the number of initialization amounts to 131,072 times when the initialization is performed in units of 8 KB, while when the initialization is performed in units of 4 MB, 256 times will do.
In the case of the virtual memory system, writing in of data is performed in units of pages. Therefore, if the page size is simply increased, it leads to a problem that the efficiency of use of the area of the main memory decreases.
FIG. 4 is a diagram presenting the problem in the case in which the page size is 4 MB.
As illustrated in FIG. 4, when data of 1 MB is written in page 23 of 4 MB, an unused area of 3 MB appears on page 23. Such a decrease in the efficiency of usage of the page becomes more noticeable as the page size increases.    [Patent Document 1] Japanese Laid-open Patent Publication No. H10-260819    [Patent Document 2] Japanese Laid-open Patent Publication No. 2007-264978